import request from '@/utils/request'

// 得到题目数据列表
export function getQuestionListApi(params) {
    return request({
        method: 'get',
        url: 'question/list',
        params
    })
}


// 添加题目
export function addQuestionApi(data) {
    return request({
        method: 'post',
        url: 'question/add',
        data:data
    })
}


// 获取题目数据
export function getQuestionApi(questionId) {
    return request({
        method: 'get',
        url: 'question/detail',
        params:{questionId}
    })
}


// 修改题目数据
export function editQuestionApi(data) {
    return request({
        method: "put",
        url: 'question/edit',
        data:data
    })
}


// 删除题目
export function delQuestionApi(questionId) {
    return request({
        method: "delete",
        url: "question/del",
        params:{questionId}
    })
}